A computing device may require entry of a passcode, e.g., a password or fingerprint data, to provide access to data stored on the computing device. When the computing device is locked and receives user input requesting access to the data, the computing device provides a user interface requesting user input of the passcode. Once the computing device receives the user input, the computing device compares the user input with a stored passcode to determine whether the user input matches the stored passcode.
The computing device may encrypt the stored passcode to prevent unauthorized access to the stored passcode. For instance, the computing device may apply a hash to a passcode and store the hashed passcode. When the computing device receives user input through the user interface, the computing device applies the same hash to the user input and compares the hashed user input with the hashed passcode to determine whether to provide access to the computing device.